﻿<%@ Page Language="C#" MasterPageFile="~/MainPage.master" AutoEventWireup="true"
    CodeFile="Categories.aspx.cs" Inherits="Categories" Title="Categories" %>

<asp:Content ID="webCategoriesTitle" ContentPlaceHolderID="cphTitle" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Categories
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="Home.aspx">Home</a> </li>
                <li class="active"><i class="fa fa-file"></i>Categories </li>
            </ol>
        </div>
    </div>
</asp:Content>
<asp:Content ID="webCategories" ContentPlaceHolderID="cphMainPage" runat="Server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link href="css/CSSGridView1.css" rel="stylesheet" type="text/css" />
        <title>Categories</title>
    </head>
    <body>
        <table border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td style="width: 122px">
                    Category ID :
                </td>
                <td style="width: 318px">
                    <asp:TextBox ID="txtCategoryID" name="txtCategoryID" runat="Server" Width="161px"
                        Enabled="false"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="width: 122px; height: 9px;">
                </td>
                <td style="height: 9px; width: 318px;">
                </td>
            </tr>
            <tr>
                <td style="width: 122px">
                    Category Name :
                </td>
                <td style="width: 318px">
                    <asp:TextBox ID="txtCategoryName" name="txtCategoryName" runat="Server" 
                        Width="160px" MaxLength="15"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvCategoryName" runat="server" ErrorMessage="Name is required"
                        ControlToValidate="txtCategoryName"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 122px; height: 9px;">
                </td>
                <td style="height: 9px; width: 318px;">
                </td>
            </tr>
            <tr>
                <td style="width: 122px">
                    Description :
                </td>
                <td style="width: 318px">
                    <asp:TextBox ID="txtDescription" name="txtDescription" runat="Server" 
                        Width="160px" MaxLength="200"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ErrorMessage="Description is required"
                        ControlToValidate="txtDescription"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 122px; height: 9px;">
                </td>
                <td style="height: 9px; width: 318px;">
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnNew" name="btnNew" Text="New" runat="Server" OnClick="btnNew_Click"
                        CausesValidation="False" />
                    <asp:Button ID="btnAdd" name="btnAdd" Text="Add" runat="server" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnSave" name="btnSave" Text="Save" runat="server" OnClick="btnSave_Click" />
                </td>
                <tr>
                    <td style="height: 9px">
                    </td>
                    <td style="height: 9px; width: 318px;">
                    </td>
                    <tr>
                        <td colspan="2">
                            <asp:DropDownList ID="ddlSearchBy" name="ddlSearchBy" runat="server" Height="32px"
                                Width="173px">
                                <asp:ListItem Text="ID"></asp:ListItem>
                                <asp:ListItem Text="Category Name"></asp:ListItem>
                                <asp:ListItem Text="Description"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:TextBox BorderColor="LightSlateGray" ID="txtSearch" name="txtSearch" runat="server"></asp:TextBox>
                            <asp:Button ID="btnSearch" name="btnSearch" Text="Search" runat="Server" OnClick="btnSearch_Click"
                                CausesValidation="False" />
                            <asp:Button ID="btnReload" runat="server" Text="Refresh" OnClick="btnReload_Click"
                                CausesValidation="False" />
                        </td>
                    </tr>
                </tr>
                <tr>
                    <td colspan="2" style="height: 9px">
                    </td>
                </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <asp:GridView ID="gvCategories" name="gvCategories" runat="server" OnSelectedIndexChanged="gvCategories_SelectedIndexChanged"
                        OnPageIndexChanging="gvCategories_PageIndexChanging" CssClass="Grid" AlternatingRowStyle-CssClass="alt"
                        PagerStyle-CssClass="pgr" AllowSorting="True" 
                        onsorting="gvCategories_Sorting">
<PagerStyle CssClass="pgr"></PagerStyle>

<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </body>
    </html>
</asp:Content>
